package com.example.yan.java文件写入;


import java.io.File;

public class Main2 {

        public static void main(String[] args) {
            try {
                File file = new File("C:\\Users\\75763\\Desktop\\test.log");
                if (file.delete()) {
                    System.out.println(file.getName() + " 文件已被删除！");
                } else {
                    System.out.println("文件删除失败！");
                }
            } catch (Exception e) {
                e.printStackTrace();
            }

        }


}
